# Maintainer: Ray Griffin <rorgoroth-dev@outlook.com>

_realname=jpegoptim
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.4.4
pkgrel=1
pkgdesc="Utility to optimize jpeg files"
arch=('any')
url="https://www.kokkonen.net/tjko/projects.html"
license=('GPL')
depends=("${MINGW_PACKAGE_PREFIX}-libjpeg-turbo")
source=("https://www.kokkonen.net/tjko/src/${_realname}-${pkgver}.tar.gz"{,.sig})
validpgpkeys=('9168CD7A2F0AAB0679D09BBA9D08A80CED908D6A')
sha256sums=('89a03ea2dfe9483dfb2e009a2851be0befb0deb7cb45c04550bcc91e1e88c1b2'
            'SKIP')

build() {
    cd "$srcdir/${_realname}-$pkgver"
    ./configure --prefix=${MINGW_PREFIX}
    make
}

package() {
    cd "$srcdir/${_realname}-$pkgver"
    make install DESTDIR="${pkgdir}"
    install -Dm644 COPYRIGHT "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}

